package com.ctshk.rpc.tour.req.es;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * @author 廖胤松
 * @create 2021-04-13
 */
@Data
@Accessors(chain = true)
@ApiModel(value="TripSearchReq对象", description="行程检索请求对象")
public class TripSearchReq implements Serializable {

    @ApiModelProperty(value = "行程id")
    private Long id;

    @ApiModelProperty(value = "渠道id")
    @NotNull(message = "渠道id不能为空")
    private Long channelId;

    @ApiModelProperty(value = "用户输入的检索条件")
    private String keyword;

    @ApiModelProperty(value = "目的地ID-三级分类")
    private Long destinationId;

    @ApiModelProperty(value = "分组编码")
    private String tourTypeCode;

    @ApiModelProperty(value = "旅行团主题id")
    private Long tourThemeId;

    @ApiModelProperty(value = "行程天数")
    private Integer travelDays;

    @ApiModelProperty(value = "出游时间-起始")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate tripBeginDate;

    @ApiModelProperty(value = "出游时间-结束")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate tripEndDate;

    @ApiModelProperty(value = "排序,1:价格降序 2:价格升序 3:天数降序 4:天数升序 ")
    private Integer sort;

    @ApiModelProperty(value = "起始价格")
    private BigDecimal startPrice;

    @ApiModelProperty(value = "结束价格")
    private BigDecimal endPrice;

    @ApiModelProperty(value = "页码")
    private Integer PageNum = 0;

    @ApiModelProperty(value = "每页数据量")
    private Integer PageSize;

}
